import request from '@/utils/request';

// 获取菜单树
export function getMenuTreeApi(postData) {
  return request({
    url: process.env.VUE_APP_SYS_SERVICE + 'api/sysMenu/getMenuTree',
    method: 'post',
    data: postData
  });
}

// 根据角色+菜单获取操作码
export function getRolePermissionsApi(postBody) {
  return request({
    url: process.env.VUE_APP_SYS_SERVICE + 'api/sysPermission/getSysPermissionListByPage',
    method: 'post',
    data: postBody
  });
}

// 更新角色权限操作码
export function updateRolePermissionsApi(postBody) {
  return request({
    url: process.env.VUE_APP_SYS_SERVICE + 'api/sysRolePermission/updateRolePermissions',
    method: 'post',
    data: postBody
  });
}